package com.cn.pojo;

import java.util.*;

public class CarThree {
    private String carName;
    private Chair carChair;
    private String[] carBrand;
    private List<String> carBrand2;
    private Set<String> carBrand3;
    private Map<String,Double> carPrice;
    private Properties crPrice2;

    public CarThree(){
        System.out.println("使用无参构造器创建对象");
    }

    public void setCarName(String carName) {
        System.out.println("使用setter注入简单类型");
        this.carName = carName;
    }

    public void setCarChair(Chair carChair) {
        System.out.println("使用setter注入引用类型");
        this.carChair = carChair;
    }

    public void setCarBrand(String[] carBrand) {
        this.carBrand = carBrand;
    }

    public String getCarName() {
        System.out.println("setter注入集合类型-Array");
        return carName;
    }

    public Chair getCarChair() {
        return carChair;
    }

    public String[] getCarBrand() {
        return carBrand;
    }

    public List<String> getCarBrand2() {
        return carBrand2;
    }

    public void setCarBrand2(List<String> carBrand2) {
        this.carBrand2 = carBrand2;
    }

    public Set<String> getCarBrand3() {
        return carBrand3;
    }

    public void setCarBrand3(Set<String> carBrand3) {
        this.carBrand3 = carBrand3;
    }

    public Map<String, Double> getCarPrice() {
        return carPrice;
    }

    public void setCarPrice(Map<String, Double> carPrice) {
        this.carPrice = carPrice;
    }

    public Properties getCrPrice2() {
        return crPrice2;
    }

    public void setCrPrice2(Properties crPrice2) {
        this.crPrice2 = crPrice2;
    }

    @Override
    public String toString() {
        return "CarThree{" +
                "carName='" + carName + '\'' +
                ", carChair=" + carChair +
                ", carBrand=" + Arrays.toString(carBrand) +
                ", carBrand2=" + carBrand2 +
                ", carBrand3=" + carBrand3 +
                ", carPrice=" + carPrice +
                ", crPrice2=" + crPrice2.stringPropertyNames() +
                '}';
    }
}
